﻿<%@ Page Title="" Language="C#" MasterPageFile="~/HotelPage/Hotel.master" AutoEventWireup="true" CodeFile="HotelCheckOrder.aspx.cs" Inherits="HotelPage_HotelCheckOrder" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" Runat="Server">
    <link href="Hotelc.css" rel="stylesheet" type="text/css" />
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
    <div>
    <table>
    <tr>
    <td>
        <asp:SqlDataSource ID="SqlDataSource1" runat="server" 
            ConnectionString="<%$ ConnectionStrings:ConnString %>" 
            SelectCommand="SELECT * FROM [OrderTable] WHERE ([hotelID] = @hotelID)">
            <SelectParameters>
                <asp:SessionParameter Name="hotelID" SessionField="hotelID" Type="String" />
            </SelectParameters>
        </asp:SqlDataSource>

        <asp:GridView ID="GridView1" runat="server" DataSourceID="SqlDataSource1" 
            AutoGenerateColumns="False" DataKeyNames="orderID" AllowPaging="True">
            <Columns>
                <asp:BoundField DataField="orderID" HeaderText="订单号" ReadOnly="True" 
                    SortExpression="orderID" />
                <asp:BoundField DataField="agentID" HeaderText="代理人号" 
                    SortExpression="agentID" />
                <asp:BoundField DataField="hotelID" HeaderText="宾馆号" 
                    SortExpression="hotelID" />
                <asp:BoundField DataField="starttime" HeaderText="开始时间" 
                    SortExpression="starttime" />
                <asp:BoundField DataField="endtime" HeaderText="结束时间" 
                    SortExpression="endtime" />
                <asp:BoundField DataField="ordertime" HeaderText="下单时间" 
                    SortExpression="ordertime" />
                <asp:BoundField DataField="orderstatus" HeaderText="订单状态" 
                    SortExpression="orderstatus" />
            </Columns>
        </asp:GridView>

    </td>
    </tr>
    <tr>
    <td>
        <asp:SqlDataSource ID="SqlDataSource2" runat="server" 
            ConnectionString="<%$ ConnectionStrings:ConnString %>" 
            SelectCommand="SELECT * FROM [StudentOrderStudentView]"></asp:SqlDataSource>
        <asp:GridView ID="GridView2" runat="server" AutoGenerateColumns="False" 
            DataKeyNames="IDcard" DataSourceID="SqlDataSource2" AllowPaging="True">
            <Columns>
                <asp:BoundField DataField="orderID" HeaderText="订单号" SortExpression="orderID" />
                <asp:BoundField DataField="name" HeaderText="学生姓名" SortExpression="name" />
                <asp:BoundField DataField="birthday" HeaderText="学生生日" 
                    SortExpression="birthday" />
                <asp:BoundField DataField="sex" HeaderText="学生性别" SortExpression="sex" />
                <asp:BoundField DataField="telephonenumber" HeaderText="手机号码" 
                    SortExpression="telephonenumber" />
                <asp:BoundField DataField="IDcard" HeaderText="身份证号" ReadOnly="True" 
                    SortExpression="IDcard" />
            </Columns>
        </asp:GridView>
    </td>
    </tr>
    </table>
    </div>
</asp:Content>

